#ifndef OSG_USER_DATA_H
#define OSG_USER_DATA_H
#include <osg/Node>
#include <osg/Group>
#include <qobject.h>
#include "Def.h"

class OsgUserData : public QObjectUserData
{
public:
	virtual ~OsgUserData()
	{
	}

	osg::Node* node = nullptr;
	osg::Group* group = nullptr;
};

template<class Current,class Base>
Current* fromBaseToCurrent(Base* base)
{
    if(!base)
		return nullptr;
	return dynamic_cast<Current*>(base);
}


//fromBaseToCurrent<OsgUserData,QObjectUserData>(item->userData(OSG_NODE_INDEX));

#endif